<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title></title>
	<META http-equiv=Pragma content=no-cache>
	<META http-equiv=Cache-Control content=no-cache>
	<META http-equiv=Expires content=0>
<script language="javascript1.2" type="text/javascript">
    function IsPopupDisabled()
    {
     var e = false;
     var pw1 = null;
     var pw2 = null;
     try{
      do{
       var d = new Date();
       var wName = "ptest_" + d.getTime();
       var testUrl = "<%=request.getContextPath()%>/blank.html";
       pw1 = window.open(testUrl,wName,"width=0,height=0,left=5000,top=5000",true);
       if (null == pw1 || true == pw1.closed){
        e = true;
        break;
       }
       pw2 = window.open(testUrl,wName,"width=0,height=0,left=5000,top=5000");
       if (null == pw2 || true == pw2.closed){
        e = true;
        break;
       }
       pw1.close();
       pw2.close();
       pw1 = pw2 = null;
      }
      while(false);
     }
     catch(ex){
      e = false;
     }
     if (null != pw1){
      try { if(!pw1.closed) pw1.close();pw1=null; } catch(ex){}
     }
     if (null != pw2){
      try { if(!pw2.closed) pw2.close();pw2=null; } catch(ex){}
     }
     return !e;
    }
    var isPopup = false;
	function detect(){
	    if (true == IsPopupDisabled()){
	        isPopup = true;
	    }
	}
	var warningMessage = "提示：弹出窗口被阻止";
	var warningInformation = "请点击IE的菜单{选项}-{Internet Options...},打开标签页{隐私},解除'阻止弹出窗口'的设置或单击右侧按钮。 ";
	var g_blockerHtml;
	g_blockerHtml  = "<div align=\"center\"><table border=1 cellspacing=0 cellpadding=0>";
	g_blockerHtml += "<tr><td>" + warningMessage + "</td></tr>";
	g_blockerHtml += "<tr><td>" + warningInformation + "<input type=\"button\" value=\" 确 定 \" onclick=\"openwin();\"></td></tr>";
	g_blockerHtml += "</table></div>";
	function init(){
			detect();
	        if (!isPopup){
	            var messageObject = document.getElementById("noPopHtml");
	            if (null != messageObject){
	                messageObject.innerHTML = g_blockerHtml;
	            }
	        }else{
	        	openwin();
	        }
	        return;
	}
	function openwin(){
        //var vWidth = screen.availWidth;
        //var vHeight = Math.floor(screen.availWidth*9/16)-5;
        //var interval = screen - screen.availHeight;
        //if(screen.width==1024
        var vWidth = 1024;
        var vHeight = 686;
        var interval = 50;
        if(screen.width==1024){
            window.open('<%=request.getContextPath()%>/login.jsp', '_blank', 'width='+vWidth+',height='+vHeight+',top=0,left='+(screen.availWidth-vWidth)/2+',status=yes,toolbar=no,menubar=no,scrollbars=auto,resizable=yes,location=no');
        }
        else {
      		window.open('<%=request.getContextPath()%>/login.jsp', '_blank', 'width='+vWidth+',height='+vHeight+',top='+(screen.availHeight-vHeight-interval)/2+',left='+(screen.availWidth-vWidth)/2+',status=yes,toolbar=no,menubar=no,scrollbars=auto,resizable=no,location=no');
		}
		window.opener = null;
		window.close();
	}	
</script>
</head>
<body onload="init()">
<SPAN id=noPopHtml>
</body>
</html>